import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { GImageBitmap } from "../../../../../com/mui/controls/GImageBitmap";
import { ObjCreate } from "../../common/ObjCreate";
import { ImagesConst } from "../../../resource/ImagesConst";
import { DefInfo } from "../../../resource/info/DefInfo";
import { HTMLUtil } from "../../../../../com/gengine/utils/HTMLUtil";
//class BossFieldCliffordCell
    
    export  class BossFieldCliffordCell /* flash.display.Sprite */
    {
        constructor()
        {
            
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            this.mouseChildren = false;
            this.mouseEnabled = false;
            var loc1=GlobalStyle.textFormat1;
            loc1.bold = true;
            loc1.size = 13;
            loc1.align = flash.text.TextFormatAlign.CENTER;
            this._bmpIcon = new GImageBitmap();
            ObjCreate.setObjAttri(this._bmpIcon, 10, 8, -1, -1, this);
            ObjCreate.createBitmap(ImagesConst.BossFieldCliffordBg, 0, 0, this);
            ObjCreate.createBg(3, 74, 74, 20, this, ImagesConst.SelectedBg);
            this._tfName = ObjCreate.createTextField("", 3, 75, 74, 20, this, loc1, true);
            return;
        }

        public update(arg1: DefInfo): void
        {
            this._bmpIcon.imgUrl = arg1.text1;
            this._tfName.htmlText = HTMLUtil.getHtmlByComp(arg1.name);
            return;
        }

        public set selected(arg1: Boolean)
        {
            if (arg1) 
            {
                this.graphics.lineStyle(2, 15788607);
                this.graphics.drawRect(0, 0, 80, 76);
            }
            else 
            {
                this.graphics.clear();
            }
            return;
        }

        /* internal */ /* var */_bmpIcon: GImageBitmap;

        /* internal */ /* var */_tfName: Object /* flash.text.TextField */;
    }
